<template>
    <view class="bgtmert mt70">
        <uni-list>
        	<uni-list-item title="解散组织" @tap="jiesdf"></uni-list-item>
        </uni-list>
    </view>
</template>
<script>
    export default {
        data() {
            return {
				id:""
			}
        },
        components: {},
		onLoad(e) {
			this.id=e.id	
		},
        methods: {
			jiesdf(){
				var that=this
				uni.showModal({
					title:'',
					content:'您确定要解散该组织吗？解散后， 组织内成员一并删除。',
					confirmText:'解散',
					confirmColor:'#FC5A5A',
					success: function (res) {
						if (res.confirm) {
							console.log('用户点击确定');
							that.del()
						} else if (res.cancel) {
							console.log('用户点击取消');
						}
					}
				})
			},
			async del(){	
				var params=""
				var shanchu=await this.get("/api/organization/"+this.id,params,"DELETE")				
				if(shanchu.code==0){
					uni.showToast({
						icon:"none",
						title:"解散成功"
					})
				}
			}
		},
        mounted() {}
    }

</script>
<style  scoped>
     
</style>
